import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/home/Home.vue'
import About from '../views/about/About1.vue'
import Join1 from '../views/join/Join1.vue'
import Join2 from '../views/join/Join2.vue'
import Contact from '../views/contact/Contact.vue'
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  // details
  {
    path:'/details',
    component:() => import( '../views/details/Details.vue')
  },
  {
    path:'/details2',
    component:() => import( '../views/details/Details2.vue')
  },
  {
    path:'/details3',
    component:() => import( '../views/details/Details3.vue')
  },

  //关于
  {
    path:'/about1',
    component:About,
    children:[
      {
        path:'/about1/:lid',
        component:About,
      }
    ]
  },

  //加盟
  {
    path:'/join',
    component:Join1
  },
  {
    path:'/join2',
    component:Join2
  },

  //动态
    {
      path:'/dynamic',
      component:() => import('../views/dynamic/Dynamic.vue'),
    },
    {
      path:'/dynamic2',
      component:() => import('../views/dynamic/Dynamic2.vue'),
    },
    {
      path:'/dynamic3',
      component:() => import('../views/dynamic/Dynamic3.vue'),
    },

  //联系
  {
    path:'/contact',
    component:Contact
  }

  // {
  //   path: '/about',
  //   name: 'About',

  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes,
  linkActiveClass:"isActive"
})


export default router
